package org.csu.jpetstore.service;

import org.csu.jpetstore.domain.Account;
import org.csu.jpetstore.persistence.AccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public class AccountService {
    @Autowired
    private AccountMapper accountMapper;

    public void insert(Account account){
        accountMapper.insert(account);
    }
    public void delete(String userid){
        accountMapper.delete(userid);
    }
    public void update(Account account){
        accountMapper.update(account);
    }
    public List<Account> query(Account account){
        return accountMapper.query(account);
    }
    public Account getById(String userid){
        return accountMapper.getById(userid);
    }
}
